import React, { Component, Fragment } from 'react'
import routes from '../routes'
import {renderRoutes, matchRoutes} from 'react-router-config'
import { Route } from 'react-router-dom'  // matchPath 是匹配路径的。
import Header from './header/index.js'

export default class App extends Component {
    render() {
        return (
            <Fragment>
                <Header />
                {renderRoutes(this.props.route.components)}
                {/* {routes.map((item) => {
                    return <Route {...item} />
                })} */}
            </Fragment>
        )
    }
}
